#!/usr/bin/env bash
set -e
var=`sensors|awk -F '[+.]' 'NR==3{print $2}'`
#var=`sensors |grep "Core 0" | cut -d "+" -f2 |cut -d "." -f1`
if [ $var -gt 65 ];then
	notify-send -t 3000 "cpu 0" "$(echo -e "温度已达 $var°C\n温度太高了，别玩了")"
else
	notify-send -t 3000 "cpu 0" "$(echo -e "温度只有 $var°C\n没事，温度不高")"
fi

